package model

import "gorm.io/gorm"

// 留言
type LeavingMessage struct {
	gorm.Model
	UserId      int32  `gorm:"column:user_id;type:int(11);index;not null;comment:用户id"`
	MessageType int32  `gorm:"column:message_type;type:tinyint(1);comment:留言类型：1留言,2投诉,3询问,4售后,5求购"`
	Subject     string `gorm:"column:subject;type:varchar(100);not null;comment:留言标题"`
	Message     string `gorm:"column:message;type:varchar(100);not null;comment:留言内容"`
	File        string `gorm:"column:file;type:varchar(200);comment:留言图片"`
}

// 地址表
type Address struct {
	gorm.Model
	UserId       int32  `gorm:"column:user_id;type:int(11);index;not null;comment:用户id"`
	Province     string `gorm:"column:province;type:varchar(10);not null;comment:省"`
	City         string `gorm:"column:city;type:varchar(10);not null;comment:市"`
	District     string `gorm:"column:district;type:varchar(20);not null;comment:区"`
	Address      string `gorm:"column:address;type:varchar(100);not null;comment:详细地址"`
	SignerName   string `gorm:"column:signer_name;type:varchar(20);not null;comment:收件人昵称"`
	SignerMobile string `gorm:"column:signer_,mobile;type:char(11);not null;comment:收件人手机号"`
}

// 收藏表
type UserFav struct {
	gorm.Model
	UserId  int32 `gorm:"column:user_id;type:int(11);index;not null;comment:用户id"`
	GoodsId int32 `gorm:"column:goods_id;type:int(11);index;not null;comment:商品id"`
}
